package com.example.demo.mapper;


import com.example.demo.entity.User;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface UserMapper {
    @Insert("INSERT INTO user (id,name,password,email,score) VALUES (#{id}, #{name}, #{password}, #{email},#{score})")
    void insertUser(User user);
    @Select("SELECT * FROM user")
    List<User> getAllUsers();
}
